package com.digitaleye.dpslite;

import android.database.Cursor;

public class Tip {
	
	String text;
	
	String title;
	
	int id;
	
	
	Tip(Cursor cursor) throws Exception{
		
		if(cursor.moveToFirst()){
			this.text = cursor.getString(cursor.getColumnIndex(TipsDBHelper.COLUMN_TIP_TEXT));
			this.title = cursor.getString(cursor.getColumnIndex(TipsDBHelper.COLUMN_TIP_TITLE));
			this.id = cursor.getInt(cursor.getColumnIndex(TipsDBHelper.COLUMN_TIP_ID));
		}
		else{
			throw new Exception("No such tip in table ");
		}
		

		
		
		
		
	}

}
